from django.shortcuts import render


# Create your views here.


def show_all(request):
    """
    function: 展示首页所有控件
    :return:
    """

    login_flag = request.GET.get("login_flag")
    username = request.GET.get("username")
    if login_flag:
        if login_flag == "True":
            login_res_flag = True
        else:
            login_res_flag = False
    else:
        login_res_flag = False

    content_data = {
        "title": "秀出自我",
        "hide_bottom": True,
        "username": username,
        "login_flag": login_res_flag
    }

    return render(request, "homepage/homepage.html", content_data)
